<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>这是局部组件的学习</title>
    <script src="../vue2.2.js">
    </script>
</head>
<body>
<div id="app">
    <runoob></runoob>
</div>

<script>
    var Child = {
        template: "<h1>这是局部组件</h1>"
    };
    //创建根实例
    new Vue({
        el: '#app',
        components: {
            'runoob': Child,
        }
    })
</script>
</body>
</html>